package routers

import "gin_study_blog/api"

func (r RouterGroup) AdvertsRouter() {
	advertsApi := api.ApiGroupApp.AdvertsApi
	// 添加广告
	r.POST("adverts", advertsApi.AdvertsCreateView)
	// 列表页
	r.GET("adverts", advertsApi.AdvertsListView)
	// 修改
	r.PUT("adverts/:id", advertsApi.AdvertsModifyView)
	// 删除
	r.DELETE("adverts", advertsApi.AdvertsDeleteView)
}
